package threading;

import array.EMp;

public class Counter {
	int i=0;
	EMp eMp = new EMp("", "");
	
	public synchronized void inc()
	{
//		i = i+2;
//		synchronized (eMp) {
//			i++;
//		}
		i++;
		System.out.println(i);
	}
	public synchronized void dec()
	{
		--i;
	}
	
	public synchronized int getValue(){
		return i;
	}
}
